<?php
/**
 * Created by IntelliJ IDEA.
 * User: Lukáš
 * Date: 20.12.11
 * Time: 22:56
 * To change this template use File | Settings | File Templates.
 */

class Admin_Form_Titul extends Zend_Form
{

    public function init()
    {
        $this->setName('titul');

        $id = new Zend_Form_Element_Hidden('id_titul');
        $id->addFilter('Int');

        $nazev = new Zend_Form_Element_Text('nazev');
        $nazev->setLabel('Název')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addValidator('NotEmpty');

        $predjmenem = new Zend_Form_Element_Checkbox('predjmenem');
        $predjmenem->setLabel('Titul před jménem?');

        $odeslat = new Zend_Form_Element_Submit('submit');
        $odeslat->setAttrib('id_titul', 'submitbutton');

        $this->addElements(array($id, $nazev, $predjmenem, $odeslat));

    }

}
